package com.liu.Work;

import java.io.*;

public class HomeWork02 {
    public static void main(String[] args) throws IOException {
        String filePath = "d:\\study_1.txt";
        String readLen = " ";
        int count = 0;

        BufferedReader bufferedReader = new BufferedReader(new InputStreamReader(new FileInputStream(filePath), "utf-8"));
        while ((readLen = bufferedReader.readLine()) != null) {
            System.out.println("第"+ (++count) +"行"+readLen);
        }
        if(bufferedReader!=null) {
            bufferedReader.close();
        }
    }
}
